package com.etc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.etc.entity.Foods;
import com.etc.entity.RFoods;
@Repository
public interface FoodsMapper {
    int deleteByPrimaryKey(Integer fid);

    int insert(Foods record);

    int insertSelective(Foods record);

    Foods selectByPrimaryKey(Integer fid);

    int updateByPrimaryKeySelective(Foods record);

    int updateByPrimaryKey(Foods record);
    /**
     * 根据rid查询食物
     * @param rid
     * @return
     */
	List<RFoods> getFoodsAllByRid(@Param("rid")Integer rid);
	/**
	 * 查询所有美食
	 * @return
	 */
	List<RFoods> getFoodsAll();
	/**
	 * 根据rid分页查询美食信息
	 * @param page
	 * @param limit
	 * @param rid
	 * @return
	 */
	List<RFoods> getFoodsAllByPage(@Param("start")Integer start,@Param("limit") Integer limit,@Param("rid") Integer rid);
	/**
	 * 根据rid查询美食数量
	 * @param rid
	 * @return
	 */
	int getcount(Integer rid);
}